import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store({
    state:{
          lilei:'520',
          token:'122'
    },
    getters:{
        doneTodos:state=>{
            return state.lilei
          }
    },
    actions:{
        updates(context){
             context.commit('upadatel')
        }
    },
    mutations:{
         update(state){
            state.lilei='545'
         },
         upadatel(state){
             state.lilei='哈哈'
         },
         Sztoken(state,sz){
            state.token=sz
         }
    }
}) 
export default store